package com.yibudong.found;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

import com.sns.sina.Weibo;

public class WelcomeActivity extends Activity {
	private static final String CONSUMER_KEY = "3173209062";// 鏇挎崲涓哄紑鍙戣�鐨刟ppkey锛屼緥濡�1646212960";
	private static final String CONSUMER_SECRET = "029fa9aeec2482069f03a49ddb9572df";// 鏇挎崲涓哄紑鍙戣�鐨刟ppkey锛屼緥濡�94098772160b6f8ffc1315374d8861f9";
	
	private SharedPreferences mPref;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.welcome);

		if(isFirstRun()){
			//进行sina微博认证						
			Intent intent = new Intent(this, LoginActivity.class);
			startActivity(intent);
		}else{
			//直接登陆
			login();
		}

	}
	
	private void login(){
		
	}
	
	private boolean isFirstRun(){
		SharedPreferences pref = this.getSharedPreferences("userinfo", MODE_PRIVATE);
		if(pref.contains("id") && pref.contains("login_type")){
			//不是第一次运行
			return false;
		}
		
		return true;
	}
	
}
